<link href="./themes/flat/theme.min.css" rel="stylesheet">
<link href="./css/simplebootadmin.css" rel="stylesheet">
<link href="./font-awesome/4.4.0/css/font-awesome.min.css"  rel="stylesheet" type="text/css">
<!--[if IE 7]>
<link rel="stylesheet" href="./font-awesome/4.4.0/css/font-awesome-ie7.min.css">
<![endif]-->
<link rel="stylesheet" href="./themes/flat/simplebootadminindex.min.css?">

<link rel="stylesheet" href="./css/simplebootadminindex-ie.css?" />

<script type="text/javascript">
//全局变量
var GV = {
    DIMAUB: "/",
    JS_ROOT: "{$STATIC_ROOT}/js/",
    TOKEN: ""
};
</script>


<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
    <li class="active"><a href="{:admin_url('/admin/index/menu')}">菜单</a></li>
    <li><a href="{:admin_url('/admin/index/menu_add')}">添加菜单</a></li>

    <table class="table table-hover table-bordered table-list" id="menus-table">
        <thead>
        <tr>
            <th width="15"></th>
            <th width="50">ID</th>
            <th>应用</th>
            <th>菜单名称</th>
            <th width="80">状态</th>
            <th width="180">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach name="show_rule" item="vo"}
            <tr id='node-{$vo.id}'>
                <td style='padding-left:20px;'></td>

                <td>{$vo.id}</td>
                <td>{$vo.rule_name}</td>
                <td>{$vo.name}</td>
                <td>
                    {if condition="$vo.show eq 1"}
                        显示
                    {else/}
                        隐藏
                    {/if}
                </td>
                <td>
                    <!--<a href="/index.php?g=Admin&m=Menu&a=add&parentid=109&menuid=100">添加子菜单</a> |-->
						<a href="{:admin_url('/admin/index/menu_info/id/'.$vo.id)}">编辑</a> |
						<a class="js-ajax-delete" href="{:admin_url('/admin/index/menu_del/id/'.$vo.id)}">删除</a>
					</td>
				</tr>
				{foreach name="vo.child" item="v"}
					<tr id='node-{$v.id}'  class="child-of-node-{$vo.id}">
						<td width="15"></td>
						<td>{$v.id}</td>
						<td>{$v.rule_name}</td>
						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─ {$v.name}</td>
						<td>
							{if condition="$v.show eq 1"}
							显示
							{else/}
							隐藏
							{/if}
						</td>
						<td>
							<!--<a href="/index.php?g=Admin&m=Menu&a=add&parentid=110&menuid=100">添加子菜单</a> |-->
							<a href="{:admin_url('/admin/index/menu_info/id/'.$v.id)}">编辑</a> |
							<a class="js-ajax-delete" href="{:admin_url('/admin/index/menu_del/id/'.$v.id)}">删除</a>
						</td>
					</tr>
				{/foreach}
			{/foreach}
			</tbody>
		</table>
		</ul>
	</div>
<script src="./js/jquery.js"></script>
<script src="./js/wind.js"></script>

<script src="./js/common.js"></script>

<script src="./bootstrap/js/bootstrap.min.js"></script>
<script>
	$(document).ready(function() {
		Wind.css('treeTable');
		Wind.use('treeTable', function() {
			$("#menus-table").treeTable({
				indent : 20
			});
		});
	});

	setInterval(function() {
		var refersh_time = getCookie('refersh_time_admin_menu_index');
		if (refersh_time == 1) {
			reloadPage(window);
		}
	}, 1000);
	setCookie('refersh_time_admin_menu_index', 0);
</script>
</body>





